#ifndef __OC_NetCDFReader_H__
#define __OC_NetCDFReader_H__

#include "OCVolume/VolumeOptions.h"
#include "OCVolume/VolumeJsonWriter.h"
#include "OCVolume/VolumeD3Writer.h"
#include "NcCompute.h"
#include "json/json.h"

namespace OCPP
{
	class _netCDFExport NetCDFReader
	{
	public:
		NetCDFReader();
		~NetCDFReader();

		bool open(String fileName,bool printDescription = false);
		void extract(String varName, const VolumeOptions& options, int levelIndex = -1
			, int timeIndex = -1);
		Json::Value getVars();
		static void extract(VolumeComputeList computeList
			, std::shared_ptr<VolumeAlgorithm> ncAlgorithm
			, const VolumeOptions& options
			, int levelIndex = -1
			, int timeIndex = -1);
	private:
		std::unique_ptr<NcWrapper> ncWrapper;
		String mFileName;
	};
}

#endif